/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package decorationstrings;

import java.io.IOException;
import java.io.Writer;
import java.util.Random;

/**
 *
 * @author usuario08
 */
public class RandomCaseDecorator extends MyDecorator {
    
    public RandomCaseDecorator(Writer out){
        super(out);
    }
       
    
    public void write(int c) throws IOException {
       Random ran=new Random();
        
        int a= ran.nextInt(100);
        if (a>50) {
             out.write(Character.toUpperCase((char) c));
        }else{
             out.write(Character.toLowerCase((char) c));   
        }
        
        
        
    }
}
